<?
    class Principio_Model_CompanyMapper extends Principio_Model_Company_AbstractMapper
    {
        public static function fetch($id)
        {
            try
            {
                if (intval($id) == -1)
                    return new Principio_Model_Company();

                $model_company = parent::fetch($id);
                return (is_null($model_company) ? new Principio_Model_Company() : $model_company);
            }
            catch (Exception $ex)
            {
                return self::reportException($ex);
            };
        }


        public static function fetchAll($except_model_company = null, PrincipioLab_IComparator $IComparator = null)
        {
            return Principio_Model_Company_AbstractMapper::fetchByType(Principio_Model_Company::TYPE_COMPANY, $except_model_company, $IComparator);
        }
    }
?>